import request from "@/utils/request";

// 查询分配规则列表
export function listBizPushRule(query) {
  return request({
    url: "/biz/bizPushRule/list",
    method: "get",
    params: query,
  });
}

// 查询分配规则详细
export function getBizPushRule(id) {
  return request({
    url: "/biz/bizPushRule/" + id,
    method: "get",
  });
}

// 新增分配规则
export function addBizPushRule(data) {
  return request({
    url: "/biz/bizPushRule",
    method: "post",
    data: data,
  });
}

// 修改分配规则
export function updateBizPushRule(data) {
  return request({
    url: "/biz/bizPushRule",
    method: "put",
    data: data,
  });
}

// 删除分配规则
export function delBizPushRule(id) {
  return request({
    url: "/biz/bizPushRule/" + id,
    method: "delete",
  });
}

// 查询最大编号
export function findMaxSort() {
  return request({
    url: "/biz/bizPushRule/findMaxSort",
    method: "get",
  });
}
// 导出分配规则
export function exportBizPushRule(query) {
  return request({
    url: "/biz/bizPushRule/export",
    method: "get",
    params: query,
  });
}
// 查询分配规则列表取第一条
export function findExistBizPushRule(query) {
  return request({
    url: "/biz/bizPushRule/findExist",
    method: "get",
    params: query,
  });
}
